package com.fruit.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;




/**
 * WapNotLoginSecurityInterceptor
 * @author shibeilei
 * @version 2017.11.30 12:20
 */
public class WapNotLoginSecurityInterceptor extends HandlerInterceptorAdapter {
	
	@Value("${app.key}")
	private String key;
	
	
	@Override
	public boolean preHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler) throws Exception {
		response.setContentType("text/html;charset=UTF-8");
		request.getSession().setAttribute("userId", 10);
		return true;
	}
	
}
